package ma.co.ba.BusinessApplications.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "PRESTATIONS")
public class Prestation implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;

	@Column(name = "NOM", nullable = false, length = 100)
	private String prestationName;

	@Column(name = "DESCRIPTION", length = 250)
	private String description;

	@OneToMany(mappedBy = "prestation", fetch = FetchType.LAZY)
	private List<Activite> activites;

	public Prestation() {

	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPrestationName() {
		return prestationName;
	}

	public void setPrestationName(String prestationName) {
		this.prestationName = prestationName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public List<Activite> getActivites() {
		return activites;
	}

	public void setActivites(List<Activite> activites) {
		this.activites = activites;
	}

}